package com.itsome.config;

import com.google.common.collect.Lists;
import com.itsome.pojo.PartyBuOrgMsgTbl;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 初始化BU码表信息
 *
 * @author itsome on 2021-01-10 16:39:57
 */
@Component
public class BuRunner implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        // TODO: 这里模拟从数据中获取数据
        Constant.buConfigMap.put("智慧家庭运营BU", Lists.newArrayList(
                new PartyBuOrgMsgTbl("1", "6a", "1", "position", "岗位", "", "1"),
                new PartyBuOrgMsgTbl("2", "6a", "2", "certSkill", "技能认证", "", "1"),
                new PartyBuOrgMsgTbl("3", "6a", "3", "mainPosition", "是否主岗", "", "1"),
                new PartyBuOrgMsgTbl("4", "6a", "4", "developerId", "发展人编码", "", "1"),
                new PartyBuOrgMsgTbl("5", "6a", "5", "capableCode", "能人工号", "", "0"),
                new PartyBuOrgMsgTbl("6", "6a", "6", "managerName", "能人经理姓名", "", "0"),
                new PartyBuOrgMsgTbl("7", "6a", "7", "managerId", "能人经理工号", "智家工程师/装修人员", "0")
        ));
        Constant.buConfigMap.put("自主引流运营BU", Lists.newArrayList(
                new PartyBuOrgMsgTbl("8", "1a", "1", "position", "岗位", "", "1"),
                new PartyBuOrgMsgTbl("9", "1a", "2", "certSkill", "技能认证", "", "1"),
                new PartyBuOrgMsgTbl("10", "1a", "3", "mainPosition", "是否主岗", "", "1"),
                new PartyBuOrgMsgTbl("11", "1a", "4", "developerId", "发展人编码", "", "1")
        ));
    }
}
